Component({
  options: {
    addGlobalClass: true,
  },
  data: {
    elements: [{
        title: '机械臂',
        name: 'roboticArm',
        color: 'cyan',
        icon: '087-robotic-arm-3',
        tag:'com'
      },
      {
        title: '发射器',
        name: 'mgturret',
        color: 'blue',
        icon: '../../../images/nailinggun.png',
        tag:'mgturret'
      }
    ],
  },
  /**
   * 自定义数据
   */
  customData: {
    deviceId: '',
    serviceId: '',
    characteristicId: '',
    read:'',
    write:'',
    notify:'',
    indicate:''
  },

  onLoad: function (options) {
    console.log(options)
    this.customData.deviceId = options.deviceId
    this.customData.serviceId = options.serviceId
    this.customData.characteristicId = options.characteristicId
    this.customData.write = options.write === 'true' ? true : false
    this.customData.read = options.read === 'true' ? true : false
    this.customData.notify = options.notify === 'true' ? true : false
    this.customData.indicate = options.indicate === 'true' ? true : false
    console.log("com write is  "+options.write)
    console.log("com read is  "+options.read)
    console.log("com notify is  "+options.notify)
    console.log("com indicate is  "+options.indicate)
  }

})